home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frm9_1_3
- Caption = "Colleges"
- ClientHeight = 2145
- ClientLeft = 1095
- ClientTop = 1485
- ClientWidth = 6240
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 2145
- ScaleWidth = 6240
- Begin VB.PictureBox picResult
- Height = 495
- Left = 120
- ScaleHeight = 435
- ScaleWidth = 5955
- TabIndex = 7
- Top = 1560
- Width = 6015
- End
- Begin VB.CommandButton cmdProcess
- Caption = "Process College"
- Height = 375
- Left = 2400
- TabIndex = 6
- Top = 960
- Width = 1815
- End
- Begin VB.TextBox txtYear
- Height = 285
- Left = 4560
- TabIndex = 5
- Top = 480
- Width = 615
- End
- Begin VB.TextBox txtState
- Height = 285
- Left = 1680
- TabIndex = 3
- Top = 480
- Width = 615
- End
- Begin VB.TextBox txtCollege
- Height = 285
- Left = 1680
- TabIndex = 1
- Top = 120
- Width = 3495
- End
- Begin VB.Label lblYear
- Alignment = 1 'Right Justify
- Caption = "Year founded:"
- Height = 255
- Left = 3120
- TabIndex = 4
- Top = 480
- Width = 1215
- End
- Begin VB.Label Label2
- Alignment = 1 'Right Justify
- Caption = "State (abbrev.):"
- Height = 255
- Left = 120
- TabIndex = 2
- Top = 480
- Width = 1455
- End
- Begin VB.Label lblName
- Alignment = 1 'Right Justify
- Caption = "Name of College:"
- Height = 255
- Left = 0
- TabIndex = 0
- Top = 120
- Width = 1575
- End
- Attribute VB_Name = "frm9_1_3"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdProcess_Click()
- Dim century As Integer, when As String
- 'Demonstrate use of records
- picResult.Cls
- Dim college As collegeData
- college.nom = txtCollege.Text
- college.state = txtState.Text
- college.yearFounded = Val(txtYear.Text)
- century = 1 + Int(college.yearFounded / 100)
- picResult.Print RTrim(college.nom); " was founded in the" & Str(century);
- picResult.Print "th century in "; college.state
- Dim university As collegeData
- university.nom = "M.I.T."
- university.state = "MA"
- university.yearFounded = 1878
- If college.yearFounded < university.yearFounded Then
- when = "before "
- Else
- when = "after "
- End If
- picResult.Print RTrim(college.nom); " was founded ";
- picResult.Print when; RTrim(university.nom)
- End Sub
-